import request from '@/utils/request'

// 执勤点/执勤点列表
export function listStagnationPoint(query) {
  return request({
    url: '/system/stagnation_point/list',
    method: 'get',
    params: query
  })
}

// 执勤点/执勤点详情
export function getStagnationPoint(pointId) {
  return request({
    url: '/system/stagnation_point/' + pointId,
    method: 'get'
  })
}

// 新增执勤点/执勤点
export function addStagnationPoint(data) {
  return request({
    url: '/system/stagnation_point',
    method: 'post',
    data: data
  })
}

// 修改执勤点/执勤点
export function updateStagnationPoint(data) {
  return request({
    url: '/system/stagnation_point',
    method: 'put',
    data: data
  })
}

// 删除执勤点/执勤点
export function delStagnationPoint(pointId) {
  return request({
    url: '/system/stagnation_point/' + pointId,
    method: 'delete'
  })
}


// 执勤点/执勤点执勤点用户列表
export function listStagnationPointUser(query) {
  return request({
    url: '/system/stagnation_point_user/list',
    method: 'get',
    params: query
  })
}

// 执勤点/执勤点执勤点用户详情
export function getStagnationPointUser(pointId) {
  return request({
    url: '/system/stagnation_point_user/' + pointId,
    method: 'get'
  })
}

// 新增执勤点/执勤点执勤点用户
export function addStagnationPointUser(data) {
  return request({
    url: '/system/stagnation_point_user',
    method: 'post',
    data: data
  })
}

// 批量添加队员信息
export function addStagnationPointUserAll(data) {
  return request({
    url: '/system/stagnation_point_user/add',
    method: 'post',
    data: data
  })
}

// 修改执勤点/执勤点执勤点用户
export function updateStagnationPointUser(data) {
  return request({
    url: '/system/stagnation_point_user',
    method: 'put',
    data: data
  })
}

// 删除执勤点/执勤点执勤点用户
export function delStagnationPointUser(pointId) {
  return request({
    url: '/system/stagnation_point_user/' + pointId,
    method: 'delete'
  })
}

// 用户底下的挂靠驻点信息
export function userPointBelong(query) {
  return request({
    url: '/system/stagnation_point/user',
    method: 'get',
    params: query
  })
}

// 编辑驻点团队信息单个
// export function userPointEdit(query) {
//   return request({
//     url: '/system/stagnation_point/user',
//     method: 'get',
//     params: query
//   })
// }
